/*
	File:		Color.h
	Author:		dmonroe
	Date:		11/16/2012
	Copyright:	Full Sail University

	Purpose:	Colors
*/

#ifndef COLOR_H
#define COLOR_H

struct SColor
{
	float components[ 4 ];

	// Constructors
	SColor( void )
	{
		components[ 0 ] = 1.0f;
		components[ 1 ] = 1.0f;
		components[ 2 ] = 1.0f;
		components[ 3 ] = 1.0f;
	}

	SColor( unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha = 255 )
	{
		float scale = 1.0f / 255.0f;
		components[ 0 ] = red	* scale;
		components[ 1 ] = green * scale;
		components[ 2 ] = blue	* scale;
		components[ 3 ] = alpha * scale;
	}

	// Attribute accessors
	float red	( void ) const		{	return components[ 0 ];	}
	float green	( void ) const		{	return components[ 1 ];	}
	float blue	( void ) const		{	return components[ 2 ];	}
	float alpha	( void ) const		{	return components[ 3 ];	}
};

#endif //COLOR_H
